<template>
  <a-button type="link" style="padding: 4px 6px" @click="onClick">
    详情
  </a-button>
  <detail-modal
    v-model:open="open"
    v-model:title="title"
    :context-data="propsModalData"
  />
</template>
<script setup>
import detailModal from './table-detail-modal.vue'
import { message } from 'ant-design-vue'
import { ref } from 'vue'

let propsModalData = ref({})
let open = ref(false)
let title = ref('详情')
/**
 * 外部参数
 */
let props = defineProps({
  data: { type: Object, required: true },
})

/**
 * 编辑操作
 */
function onClick() {
  open.value = true
  propsModalData.value = props.data
}
</script>
